<apes-header>
  <apes-button-list class="buttonList" [ctx]="ctx" [buttonBarMetadata]="buttonBar"
                    (click)="onEvent($event)"></apes-button-list>
</apes-header>

<apes-content class="apes-store-money">

  <div apes-row [apesGutter]="8" style="padding:8px 8px 0px;margin: 0px;">
    <div apes-col [apesMd]="24" style="padding: 0px">
      <apes-card [apesTitle]="'查询条件'" class="query-search query-search-title">
        <formly-form [model]="model" [fields]="field"></formly-form>
      </apes-card>
      <apes-card [apesTitle]="'查询结果'" class="query-search-title">
        <div class="store-money-query-results">
          <div apes-row>
            <div apes-col [apesMd]="24" class="combined-title">
              <div>收款方式合计：
                <span class="combined-title-num">¥{{showData.PaymentMethodTotal?showData.PaymentMethodTotal:0}}</span>
                <span class="combined-title-cha">=</span>
              </div>
              <div>  营业收入：
                <span class="combined-title-num">¥{{showData.BusinessIncomeTotal?showData.BusinessIncomeTotal:0}}</span>
                <span class="combined-title-cha">+</span>
              </div>
              <div>  预收款增减：
                <span class="combined-title-num">¥{{showData.AdvancesReceivedTotal?showData.AdvancesReceivedTotal:0}}</span>
                <span class="combined-title-cha">+</span>
              </div>
              <div>  代收款项：
                <span class="combined-title-num">¥{{showData.LossCollectionTotal?showData.LossCollectionTotal:0}}</span>
              </div>
            </div>
            <div apes-col [apesMd]="24" class="combined-title">
              <div>实际收入合计：
                <span class="combined-title-num">¥{{showData.IncomeTotal?showData.IncomeTotal:0}}</span>
                <span class="combined-title-cha">=</span>
              </div>
              <div>  营业收入：
                <span class="combined-title-num">¥{{showData.BusinessIncomeTotal?showData.BusinessIncomeTotal:0}}</span>
                <span class="combined-title-cha">+</span>
              </div>
              <div>  预收款增减：
                <span class="combined-title-num">¥{{showData.AdvancesReceivedTotal?showData.AdvancesReceivedTotal:0}}</span>
                <span class="combined-title-cha">+</span>
              </div>
              <div>  会员联盟：
                <span class="combined-title-num">¥{{showData.CrossCompanyTotal?showData.CrossCompanyTotal:0}}</span>
              </div>
            </div>
          </div>
          <div apes-row>

            <div class="query-grid">
              <ng-container *ngFor="let item of gridData, let i = index">
                <apes-card class="query-grid-card">
                  <ag-grid-angular #grid
                                   style="width: 100%;margin-bottom:16px;height:49vh;"
                                   class="ag-theme-balham"
                                   [domLayout]="'normal'"
                                   [rowHeight]="32"
                                   [modules]="modules"
                                   enableColResize="true"
                                   enableSorting="true"
                                   enableFilter="true"
                                   [rowData]="item.rowData"
                                   [context]="context"
                                   [rowModelType]="'clientSide'"
                                   [gridOptions]="item.gridOptions"
                                   [frameworkComponents]="frameworkComponents"
                                   [columnDefs]="item.columnDefs"
                                   (gridReady)="onGridReady($event)"
                                   [pinnedBottomRowData]="item.pinnedBottomRowData">
                  </ag-grid-angular>
                </apes-card>
              </ng-container>
            </div>

          </div>
        </div>
      </apes-card>
    </div>
  </div>


</apes-content>


